<template>
	<view class="tools-wrapper">
		<!-- <view class="flexRowNoWrap">
			<image class="logo" src="/static/img/logo.png"></image>
			<view class="title">
				{{title}}
			</view>
		</view> -->

		<view class="comp-list">
			<view class="comp-list-item flexRowNoWrapBetween" hover-class="comp-list-item-active" v-for="(item,index) in compList" :key="index" @click="goPage(item.compUrl)">
				<view class="comp-list-item-title">{{item.compName}}</view>
				<uni-icons type="arrowright" size="20" color="#999999"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				title: 'uni-app 移动端组件',
				compList:[
					{
						'compName':'iconfont图标库',
						'compUrl':'tools/icon',
					},
					{
						'compName':'常用字段校验工具',
						'compUrl':'tools/validate',
					},
					{
						'compName':'更多待开发',
						'compUrl':'tabScroll/tabScroll',
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			goPage(url){
				uni.navigateTo({
				    url: '../'+url
				});
			},
		}
	}
</script>

<style lang="scss">
	.tools-wrapper {
		padding: 0 80rpx;

		.logo {
			height: 100rpx;
			width: 100rpx;
			border-radius: 12rpx;
		}

		.title {
			font-size: 36rpx;
			color: #333333;
			margin-left: 30rpx;
		}
		.comp-list{
			// margin-top: 100rpx;
			.comp-list-item {
				background: #f7f8fa;
				border-radius: 99px;
				-webkit-transition: background 0.3s;
				transition: background 0.3s;
				padding: 10rpx 24rpx;
				margin-bottom: 50rpx;
			}
			
			.comp-list-item-active {
				background-color: #e7e5e7;
			}
			
			.comp-list-item-title {
				font-size: 14px;
				font-weight: bold;
				padding-left: 18rpx;
			}
		}
		

	}
</style>
